package types;

/**
 * 表示语义搜索结果的类
 */
public class SemanticSearchResult {
    private String content;
    private String relativePath;
    private int startLine;
    private int endLine;
    private String language;
    private double score;

    /**
     * 创建一个新的语义搜索结果
     * 
     * @param content 内容
     * @param relativePath 相对路径
     * @param startLine 开始行
     * @param endLine 结束行
     * @param language 语言
     * @param score 相似度分数
     */
    public SemanticSearchResult(String content, String relativePath, int startLine, int endLine, String language, double score) {
        this.content = content;
        this.relativePath = relativePath;
        this.startLine = startLine;
        this.endLine = endLine;
        this.language = language;
        this.score = score;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getRelativePath() {
        return relativePath;
    }

    public void setRelativePath(String relativePath) {
        this.relativePath = relativePath;
    }

    public int getStartLine() {
        return startLine;
    }

    public void setStartLine(int startLine) {
        this.startLine = startLine;
    }

    public int getEndLine() {
        return endLine;
    }

    public void setEndLine(int endLine) {
        this.endLine = endLine;
    }

    public String getLanguage() {
        return language;
    }

    public void setLanguage(String language) {
        this.language = language;
    }

    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }

    @Override
    public String toString() {
        return "SemanticSearchResult{" +
                "relativePath='" + relativePath + '\'' +
                ", startLine=" + startLine +
                ", endLine=" + endLine +
                ", language='" + language + '\'' +
                ", score=" + score +
                '}';
    }
}